﻿<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page import="pms.common.value.UserSessionValue"  %>
<%@ page import="pms.common.value.UserDataValue"  %>
<%@ page import="pms.common.utils.Consts"  %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%
UserSessionValue l_userSessionValue = (UserSessionValue)session.getAttribute(Consts.USER_SESSION_KEY);
%>
<html>
<head>
<title>メイン</title>
		<script language="JavaScript">
		function submitFormWithUserId(form,id) {		
			userForm.userId.value=id;
			return true;
		}
        function deleteNow(form) {
        	var flag = confirm("該当ユーザを削除します。よろしいですか？");
			if (flag) {
				return true;				
			} else {			
				return false;
			}
        }		
		</script>
</head>
<META http-equiv="Content-Type" content="text/html;charset=Shift_JIS">
<META http-equiv="Content-Style-Type" content="text/css">
<body text=#003366>		
<s:actionmessage/>   
<s:actionerror/>
<s:form name="userForm" method="POST" action="userinsert" theme="simple">
<s:hidden name="userId"/>
<table style="table-layout:fixed;" align="center">
	<colgroup>
	<col class=col7
	<tr><td rowspan=2 >
	　　<fieldset  style="height:670">
	  <legend  style="height:15">ユーザ一覧</legend>
		<br>	  
	   <table id="tabs1"> 	
	     <tr><td><span>1 ◆ 　対象ユーザ<span style="font-weight:bold;color:#FF6633">(<s:property value = "userCount"/>)</span>個</span></td></tr>
	   </table>
	   <br>
		 <table class="pol_list" style="width:100%;" >
		        <col class="col1">
		        <col class="col2">
		        <col class="col2">
		        <col class="col2">
				<col class="col1">
				<col class="col1">
				<col class="col2">
		  <tr>		    
				<th>項  番</th>
				<th>ユーザID</th>
				<th>ユーザ名</th>
				<th>ユーザ表示名</th>
				<th>区分</th>
				<th>会社</th>
				<th>グルプ</th>
		  </tr>		  
		<s:iterator value="userdatalist" id = "list" status = "row" > 
		  <tr>
		   	<td><s:submit  cssClass="btn_1"  name="buttonId" value="選択" action="userinsert!doUpdate" onclick="javascript:submitFormWithUserId(this,%{#list.userId});"/>&nbsp;<s:property value = "#row.index + 1 "/></td>
		   	<td><s:property value = "userId"/></td>
		   	<td><s:property value = "userName"/></td>
		   	<td><s:property value = "userDispName"/></td>
		   	<td><s:property value = "userRights"/></td>
		   	<td><s:property value = "userCompany"/></td>
		   	<td><s:property value = "userGroupId"/></td>
		</tr>
		</s:iterator>		 		 	
	    </table> 
		</fieldset>
	</td><td>

	<fieldset style="width:100%;height:300">
	<legend  style="height:15">ユーザ登録</legend>
	<table style="width:95%;height:90%;empty-cells:show;border-collapse:collapse;table-layout:fixed;font-size:12px;" align="left">
				<tr>			 
     				<td >ユーザ名: </td>
    				<td><input  style="width:100px;height:20px" type="text" name="inusername" value=<s:property value="inusername"/>></td>
   		    	</tr>
				<tr>			 
    				<td >ユーザ表示名: </td>
    				<td><input  style="width:100px;height:20px" type="text" name="inuserdispname" value=<s:property value="inuserdispname"/>></td>
   		    	</tr>
				<tr>			 
     				<td >ユーザパースワード: </td>
    				<td><input  style="width:80px;height:20px" type="password" name="inuserpassword" value=<s:property value="inuserpassword"/>></td>
   		    	</tr>
				<tr>			 
    				<td >ユーザパースワード（確認）: </td>
    				<td><input  style="width:80px;height:20px"  type="password" name="inuserpassword2" value=<s:property value="inuserpassword2"/>></td>
   		    	</tr>
				<tr>			 
     				<td >ユーザ区分: </td>
    				<td><input  style="width:20px;height:20px" type="text" name="inuserkbn" value=<s:property value="inuserkbn"/>></td>
   		    	</tr>
				<tr>			 
     				<td >所属会社: </td>
    				<td><input  style="width:100px;height:20px" type="text" name="inkaisya" value="HYRON"/></td>
   		    	</tr>
				<tr>			 
     				<td >所属グルプ: </td>
    				<td><input  style="width:100px;height:20px" type="text" name="ingroup" value=<s:property value="ingroup"/>></td>
   		    	</tr>
		<tr align="right"  style="padding:10px 10px 10px 20px;"><td colspan=2><s:submit cssClass="btn_1"  name="buttonId" value="登　　録"/></td></tr>
	</table>
	</fieldset>

	</td></tr>
	<tr><td valign="bottom">

	<fieldset style="width:100%;height:300">
	<legend "height:15">ユーザ更新</legend>
	<table style="width:95%;height:90%;empty-cells:show;border-collapse:collapse;table-layout:fixed;font-size:12px;" align="left">
				<tr>			 
     				<td >ユーザ名: </td>
    				<td><input  style="width:100px;height:20px" type="text" name="upusername" value=<s:property value="upusername"/>></td>
   		    	</tr>
				<tr>			 
    				<td >ユーザ表示名: </td>
    				<td><input  style="width:100px;height:20px" type="text" name="upuserdispname" value=<s:property value="upuserdispname"/>></td>
   		    	</tr>
				<tr>			 
     				<td >ユーザパースワード: </td>
    				<td><input  style="width:80px;height:20px" type="password" name="upuserpassword" value=<s:property value="upuserpassword"/>></td>
   		    	</tr>
				<tr>			 
    				<td >ユーザパースワード（確認）: </td>
    				<td><input  style="width:80px;height:20px"  type="password" name="upuserpassword2" value=<s:property value="upuserpassword2"/>></td>
   		    	</tr>
				<tr>			 
     				<td >ユーザ区分: </td>
    				<td><input  style="width:20px;height:20px" type="text" name="upuserkbn" value=<s:property value="upuserkbn"/>></td>
   		    	</tr>
				<tr>			 
     				<td >所属会社: </td>
    				<td><input  style="width:100px;height:20px" type="text" name="upkaisya" value=<s:property value="upkaisya"/>></td>
   		    	</tr>
				<tr>			 
     				<td >所属グルプ: </td>
    				<td><input  style="width:100px;height:20px" type="text" name="upgroup" value=<s:property value="upgroup"/>></td>
   		    	</tr>
		<tr align="right" style="padding:10px 10px 10px 20px;">
			<td><s:submit cssClass="btn_1"  value="削　　除"  name="buttonId" onclick="javascript:return deleteNow(userForm)"/></td>
			<td><s:submit cssClass="btn_1"  value="更　　新"  name="buttonId" /></td>
		</tr>
	</table>
	</fieldset>
	</td></tr>
	</table>
<table cellspacing=20 summary=隙間用>
<tbody><tr><td></td></tr></tbody>
</table>
</s:form>
</body>
</html>	 